package cn.edu.fzu.delivery.domain.entity;

import cn.edu.fzu.delivery.domain.enums.CourierStatusEnum;
import cn.edu.fzu.delivery.domain.enums.CourierTypeEnum;
import cn.edu.fzu.delivery.domain.enums.UrgencyEnum;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 快递
 *
 * @author fangxin
 * @date 2022/11/2
 */
@Data
public class Courier {

    private Long              id;
    //快递单号
    private String            courierId;
    //寄件人
    private CourierAddress    sender;
    //收件人
    private CourierAddress    receiver;
    //类型
    private CourierTypeEnum   type;
    //重量
    private Double            weight;
    //价格
    private BigDecimal        price;
    //状态
    private CourierStatusEnum status;
    //寄件时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date              createTime;
    //物流链
    private Logistics         logistics;
    //紧急程度
    private UrgencyEnum       urgency;
    //签收时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date              endTime;

}
